module ALU_AdderFraction(A, B, Result, m2, m6, m7);
	input [31:0] A, B;
	output [31:0] Result;
	input m2, m6, m7;
	
	wire sub;
	wire [31:0] RCABin, RCAOut, ResultIfSelected;
	
	wire [3:0] Cins, Couts;
	
	assign sub=m6|m7;
	assign RCABin=B^{32{sub}};
	
	assign Cins={Couts[2:0], sub};
	assign Couts[3]=1'bz;
	
	RCA U_RCA[3:0] (.A(A), .B(RCABin), .C0(Cins), .S(RCAOut), .C8(Couts));

	MUX_2to1 #(32) WhichtoReturn(.D0(RCAOut), .D1({31'b0, RCAOut[31]}), .S0(m7), .Y(ResultIfSelected));
	
	MUX_2to1 #(32) ReturnOrNot(.D0(32'b0), .D1(ResultIfSelected), .S0(m2|m6|m7), .Y(Result));
	
endmodule